package org.lq.ssm.controller;

import org.lq.ssm.Web.HttpResult;
import org.lq.ssm.po.PermissionPO;
import org.lq.ssm.po.UserPO;
import org.lq.ssm.service.PermissionService;
import org.lq.ssm.service.RoleService;
import org.lq.ssm.service.UserService;
import org.lq.ssm.vo.UserVO;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.List;

@RestController
@RequestMapping("/permission")
public class PermissionController {

    @Autowired
    PermissionService permissionService;



    @GetMapping("getallpermission.do")
    public HttpResult<List<UserVO>> getAllUser(String level){
        List<PermissionPO> allPermissions = permissionService.getAllPermission(level);

        return HttpResult.ok(allPermissions,"数据没问题");
    }
}
